/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package modele;

/**
 *
 * @author sio
 */
public class Med implements Comparable<Med> {

    String nom;
    String prenom;
    String adresse;
    String tel;
    String spe;
    String departement;
    String id;

    public Med(String nom, String prenom, String adresse, String tel, String spe, String departement,String id) {
        this.nom = nom;
        this.prenom = prenom;
        this.adresse = adresse;
        this.tel = tel;
        this.spe = spe;
        this.departement = departement;
        this.id = id;

    }

    public String getAdresse() {
        return adresse;
    }

    public String getNom() {
        return nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public String getSpe() {
        return spe;
    }

    public String getTel() {
        return tel;
    }
    public String getDepartement(){ return departement; }

    public int compareTo(Med m) {
        if (nom.compareTo((m).nom) != 0) {
            return nom.compareTo((m).nom);
        } else if (prenom.compareTo((m).prenom) !=0) {
     
        return prenom.compareTo((m).prenom);
    }else{
            return id.compareTo((m).id);
            }

    }
}
